package commons.util;

import java.util.Map;


/**
 * @author Ramon De La Cruz
 */
public class IntegerItem 
implements Map.Entry<Integer, String>
{
	private Integer key;
	private String label;
	
	public IntegerItem(Integer key, String label) {
		super();
		this.key = key;
		this.label = label;
	}

	@Override
	public Integer getKey() {
		return key;
	}

	@Override
	public String getValue() {
		return label;
	}

	@Override
	public String setValue(String object) {
		this.label = object;
		return label;
	}

	@Override
	public boolean equals(Object o) {
		IntegerItem i = (IntegerItem) o;
		return this.key.equals(i.key);
	}

	@Override
	public String toString() {		
		return key +". "+ label;
	}

	
}
